/*
 * @Author: wangxing wangxing@kd.com
 * @Date: 2025-01-07 14:47:59
 * @LastEditors: wangxing wangxing@kd.com
 * @LastEditTime: 2025-07-21 20:44:34
 * @FilePath: \quick-front\static\drawio\js\grapheditor\Init.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * Copyright (c) 2006-2021, JGraph Ltd
 * Copyright (c) 2006-2021, draw.io AG
 */
// urlParams is null when used for embedding
window.urlParams = window.urlParams || {};

// Public global variables
window.MAX_REQUEST_SIZE = window.MAX_REQUEST_SIZE || 10485760;
window.MAX_AREA = window.MAX_AREA || 15000 * 15000;

// 是否为sysml布局
window.isSysml = false

// 画布是否可编辑
window.graphEditable = true

// 是否处于添加状态
window.isAddingStatus = false
// 是否为戳击模式
window.isPokePatttern = false

// sidebar 是否展示svg图标
window.showThumb = true

// URLs for save and export
window.EXPORT_URL = window.EXPORT_URL || '/export';
window.SAVE_URL = window.SAVE_URL || '/save';
// window.OPEN_URL = window.OPEN_URL || 'http://192.168.0.101:20002/object/openGraphPage';
window.OPEN_URL = window.top.g.ApiUrl2 + '/object/openGraphPage';
window.RESOURCES_PATH = window.RESOURCES_PATH || 'resources';
window.RESOURCE_BASE = window.RESOURCE_BASE || window.RESOURCES_PATH + '/grapheditor';
window.STENCIL_PATH = window.STENCIL_PATH || 'stencils';
window.IMAGE_PATH = window.IMAGE_PATH || 'images';
window.STYLE_PATH = window.STYLE_PATH || 'styles';
window.CSS_PATH = window.CSS_PATH || 'styles';
window.OPEN_FORM = window.OPEN_FORM || 'open.html';
window.PICTURE_PATH = '/picture/pictureView.dhtml';

window.relationRules = {}
window.containRules = {}
window.addChildNodeConfig = {}


// Sets the base path, the UI language via URL param and configures the
// supported languages to avoid 404s. The loading of all core language
// resources is disabled as all required resources are in grapheditor.
// properties. Note that in this example the loading of two resource
// files (the special bundle and the default bundle) is disabled to
// save a GET request. This requires that all resources be present in
// each properties file since only one file is loaded.
window.mxBasePath = window.mxBasePath || 'mxgraph';
window.mxImageBasePath = window.mxImageBasePath || 'mxgraph/images';
window.mxLanguage = window.mxLanguage || urlParams['lang'];
window.mxLanguages = window.mxLanguages || ['zh'];

//树节点
window.ISTREENODEPAGE = false;
window.canAddChildPage = false;
window.TREENODEARROW = [];
window.TREENODECELLS = [];
//时间轴
window.ISTIMEPAGE = false;
window.haveTimeCell = false;
window.click = false;
window.TIMECELL = null;
window.ARROW = null;
window.firstline = true;
window.mxConnectioCell = "";
// 是否在初始化xml，此时不记录画布更新
window.isSetingGraphXml = false

window.containRules = {}

// 时序图相关节点  做特殊处理 作战节点
window.displayTypeComboStr = 'SYSML_SEQUENCE_SHENGMINGXIANJIEDIAN,LABEL_TIME_BUSINESS,SYSML_SEQUENCE_BIANJIE';
// 端口
window.portList = ['SYSML_INTERNALMODULE_WANZHENGPORTJIEDIAN', 'SYSML_BLOCKDEFINITION_WANZHENGPORTJIEDIAN', 'SYSML_INTERNALMODULE_DAILIPORTJIEDIAN', 'SYSML_BLOCKDEFINITION_DAILIPORTJIEDIAN']
// 内部模块图
window.INTERNALMODULE = ['DIAGRAM_SYSML_INTERNALMODULE']

window.BLOCKMODULE = ['DIAGRAM_SYSML_INTERNALMODULE', 'DIAGRAM_SYSML_BLOCKDEFINITION']


window.fixedPageId = 'fixedPageIdABCDEFG123456'

window.squareLine = ['LINE_KEZHIXING', 'LINE_SHISHI', 'SYSML_REQUIREMENT_YANZHENGLUJING', 'SYSML_REQUIREMENT_MANZULUJING', 'SYSML_REQUIREMENT_JINGHUALUJING',
      'SYSML_REQUIREMENT_ZHUISULUJING', 'SYSML_REQUIREMENT_PAISHENGXUQIULUJING', 'SYSML_REQUIREMENT_PAISHENGLUJING', 'SYSML_USECASE_BHLJ', 'SYSML_USECASE_KZLJ',
      'SYSML_PACKAGE_DAORUPATH'
]

window.fzPageArr = [];

/**
 * 时序图连线display
 * @type {string[]}
 */
window.SEQUENCE_RELATION_DISPLAY = ['LINE_HORIZONTAL_STRAIGHT', 'SYSML_SEQUENCE_YIBUXIAOXI', 'SYSML_SEQUENCE_TONGBUXIAOXI', 'SYSML_SEQUENCE_YINGDAXIAOXI', 'SYSML_SEQUENCE_CHUANGJIANXIAOXILUJING', 'SYSML_SEQUENCE_DIUSHIXIAOXILUJING', 'LINE_SELFMESSAGE'];
